///**************************************************************************************************
//* Title: SmurfsCollisionStructures.cpp
//* Authors: Gael Huber
//* Description: Defines enumerations and structures used across physics methods and collision 
//*	detection systems.
//**************************************************************************************************/
//#include "SmurfsCollisionStructures.h"
//
///**************************************************************************************************
//* Implement this to compute the derived quantities. It must be called after P0, P1, and P2 are 
//* initialized. If the triangle is used many times in sphere-triangle intersection test, call this
//* function once and re-use derived quantities in GetContact.
//**************************************************************************************************/
//void Triangle::computeDerived(void);
//
///**************************************************************************************************
//* Partition projection (C + t*V) = K + t*W by triangle's Voronoi region.
//**************************************************************************************************/
//Partition Triangle::computePartition(Sphere sphere, Vector3 v) {
//	Partition s;
//
//	Vector3 cmP0 = sphere.center - p0;
//	Vector2 k = Vector2(u0.dot(cmP0), u1.dot(cmP0));
//	Vector2 w = Vector2(u0.dot(v), u1.dot(v));
//
//	if(w != Vector2()) {
//		// Clip the line against each Voronoi region
//		s.numElements = 0;
//		for(int i = 0; i < 7; i++) {
//			float tMin, tMax;
//			if(getOverlappedInterval(k, w, (Label)i, tMin, tMax)) {	// Must return tMax > tMin
//				Element& element = S.elements[S.numElements];
//				element.tMin = tMin;
//				element.tMax = tMax;
//				element.label = R0;
//				++S.numElements;
//			}
//		}
//
//	}
//}
//
///**************************************************************************************************
//* Clip K + t*W against he region identified by "label". Return true when there is overlap, in which
//* case the return value "tMin" and "tMax" are valid with tMin < tMax.
//**************************************************************************************************/
//bool Triangle::getOverlapIntertal(Vector2 k, Vector2 w, Label label, float& tMin, float& tMax) {
//
//	return true;
//}
//
///**************************************************************************************************
//* When the projected line is degenerate to a point K, return the label of the Voronoi region that
//* contains K. This is a point-in-convex-region test.
//**************************************************************************************************/
//Label Triangle::getContainingRegion(Vector2 k) {
//}
//	
///**************************************************************************************************
//* Compute the roots of the quadratic F(t) corresponding to the element.
//**************************************************************************************************/
//void Triangle::computeRoots(Sphere sphere, Vector3 v, Element element, int& numRoots, 
//	ContactInfo contact[2]) {
//	float sqrRadius = sphere.radius * sphere.radius;
//	float tMin = element.tMin;
//	float tMax = element.tMax;
//	Vector3 diff, conCoeff, linCoeff;
//	float invSqrLen, s0, s1, roots[2];
//	float a0, a1, a2;
//}
//
///**************************************************************************************************
//* Compute the roots of a2*t^2 + 2*a1*t + a0 = 0 on the interval [tMin, tMax].
//**************************************************************************************************/
//void Triangle::solveQuadratic(float tMin, float tMax, float a0, float a1, float a2, int& numRoots, 
//	float roots[2]) {
//}